package com.hqbzl.c1.code;

import java.lang.reflect.Array;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @author hq
 */
public class TestPool1 {
    class MyQueue<T> {
        final ReentrantLock room = new ReentrantLock();
        final Condition provicer = room.newCondition();
        final Condition consumer = room.newCondition();
        private  Deque<T> queue = new ArrayDeque<>();
        private int size;
        private T[] array;

        public MyQueue(Class<T> clazz, int size) {
            array = (T[]) Array.newInstance(clazz, size);

        }

        private void a() {

        }

    }
}
